Copyright: DLGroup Copyright DameWare Development 1998
Citation: DameWare Development 1998


 DLGroup Help Index

Properties	Methods

DLGroup Custom Control

Description:

DameWare Local Group Active component is a 32-bit custom control for use with Visual Basic, Visual C++, Windows Scripting Host and Web pages or any environment that can host Active controls.  DameWare Local Group enables Windows NT Local Group and User security administration functionality from within your application and HTML/Active Server Pages (ASP) web pages.  Administration functions include add/delete functionality for Windows NT Local Groups, add/delete functionality for user members within the group(s), user lookup to determine group membership and specific user connection/disconnection capability.  Ideal for remote administration implementations for Help Desks, Internet Service Providers (ISP) and others.

Note: DameWare Local Group is designed to run on Windows NT only.

The DameWare Local Group Active control utilizes the Active Template Library (ATL), which reduces dependencies on other library files.  Additional information on the ATL is available on our web site at: http://www.dameware.com/faq.htm

Registration:

How to register

What do I get when I register

License

Copyright

Installation and Support:

Installation

Technical Support

Using within a Web page


Technical Support

Technical Support is provided in any of the following ways for your convenience:

•  If possible, we prefer that you use e-mail to communicate with us. Because we check e-mail many times daily (most often via our support@dameware.com account), you can be sure we will be able to respond to you quickly.

•  Online FAQ is available at http://www.dameware.com/faq.htm.

•  Online discussion group can be viewed at http://www.dameware.com/discuss.htm.

•  You can fax us at 504-626-1189.

•  You can contact us by phone at 504-626-7545 (recommended to be used as a last resort)

DAMEWARE DEVELOPMENT

1024 Live Oak Loop

Mandeville, La.  70448


How to register
How To Order

For added convenience, you may order DLGroup in any of the following ways:

♦	Visit our Web Site at http://www.dameware.com/northstar.htm to order online with your Visa, MasterCard or Discover credit card, fax your order, or order by telephone:

Online at http://www.dameware.com/northstar.htm
Faxed Orders at 1-785-539-3743
Phoned Orders  calls taken 10am - 8pm, EST, Monday-Friday
     1-800-699-6395 (From the USA only)
     1-785-539-3731

Be sure to reference product number #3301 when ordering from NorthStar.

Note: Any product or support questions should be sent to support@dameware.com.  NorthStar solutions is a purchase vendor only, for DameWare Development, and unable to answer any questions about our products!

♦	For quantity pricing, please contact DameWare Development at sales@dameware.com.

♦	If you prefer to pay by check, or money order please send order information to:

DAMEWARE DEVELOPMENT

1024 Live Oak Loop

Mandeville, LA.  70448

♦	For payment by purchase order please send order information to address below, or fax to 504-626-1189:

DAMEWARE DEVELOPMENT

1024 Live Oak Loop

Mandeville, LA.  70448

Note: NorthStar Solutions does NOT accept purchase orders.


What do I get when I register
What do I get when I order

There are no limitations in this shareware release, but you may encounter a "nag" screen from time to time.  Upon receipt of your order you will receive a license file which will remove the "nag" screen. The product will be registered in your name and you will receive the latest version.  It's a small price to pay for your peace of mind. You may also wish to check on our Web Home Page for the latest version which you have rights to use as a registered user.  Our Web Home Page address is:  http://www.dameware.com.


License Agreement

DLGroup is not public domain or free software.

DLGroup is copyrighted, and all rights are reserved by DameWare Development.

Licensing:

1. shareware version

You may use the shareware version of DLGroup for up to 30 days in your design environment for evaluation purposes only. You may copy and distribute it freely as long as all the files in the package, including the demo programs are distributed with it and no changes or additions of any kind are made to the original package.

2. registered version

As a registered user, you can use DLGroup in your design environment and you have a royalty-free right to distribute executables that use DLGroup as a runtime component. Only registered users can distribute executables using DLGroup.

You may copy the software to facilitate your use of it on as many computers as there are licensed users specified in the license file. Making copies for any other purpose violates international copyright laws. In particular, you are prohibited from distributing a registered version of DLGroup, except as a runtime component of one of your applications.

The license file allows you to compile your applications with DLGroup. You are not allowed to distribute the DLGroup.LIC or DLGroup.lpk license files with any application that you distribute.  You are allowed to distribute the DLGroupR.LIC with your Windows Scripting Host script(s).

Disclaimer of Warranty:

THIS SOFTWARE AND THE ACCOMPANYING FILES ARE SOLD "AS IS"  WITHOUT WARRANTY OF ANY KIND EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

Good data processing procedure dictates that any program be thoroughly tested with non-critical data before relying on it.

The user must assume the entire risk of using the program.

Your use of this product indicates that you have read and agreed to these terms.


Installation

DameWare Local Group is distributed with a self-extracting installation wizard file - DLGroupW.exe.  Once executed, DLGroupW.exe will install the DLGroup components into a directory of your choosing (c:\Program Files\DameWare\DLGroup\ by default), and register the DLGroup.dll component into the Windows system registry.

The following is a list of the files installed during the installation wizard process:

DLGroup.DLL	32-bit Active DLL Control

DLGroup.HLP	On-line documentation

DLGroup.CNT	Contents file for On-line documentation

DLGroup.EXE	DLGroup VB sample executable

DLGroup.FRM	DLGroup VB sample form

DLGroup.VBP	DLGroup VB sample project file

DLGroup.ASP	DLGroup Active Server Pages sample file

DLGroup.HTM	DLGroup Web page sample file

DLGroup.VBS	DLGroup Windows Scripting Host sample script

Once you have registered the DLGroup component, you will receive the following license files:

DLGroup.LIC	License file

DLGroup.LPK	License file for web pages

DLGroupR.LIC	License file for Windows Scripting Host

Distribution Note:

When you create and distribute applications that use DLGroup, you can install the appropriate file in the customer's Microsoft Windows \SYSTEM subdirectory, or any specific directory as long as the component is registered to that subdirectory.

Note: You are not allowed to distribute the DLGroup.LIC or DLGroup.lpk license files with any application that you distribute. You are allowed to distribute the DLGroupR.LIC file with your Windows Scripting Host script(s).


Using within a Web page.
Using in a Web page

DLGroup Active control can easily be used in a Web Page.  The following is a simple example.  You may also wish to visit sites such as Microsoft at (http://www.microsoft.com/workshop) or DameWare Development’s home page at (http://www.dameware.com).

<html>

<head>

<title>DLGroup</title>

</head>

<body>

<p align="left">

<object id="DLGroupCtl1" type="application/x-oleobject"

classid="CLSID:1251FF85-D61A-11D1-A7CA-00C04FA30EBD"

codebase="DLGroup.dll#Version=1, 4, 1, 4" width="35" height="35">

</object>

<br>

<em><strong><big><big>DameWare Local Group</big></big></strong></em></p>

<div align="left">

<table border="0" width="90%" cellspacing="0" cellpadding="0">

  <tr>

    <td width="25%">Machine Name<br>

    <input value name="frmMachine" size="27"></td>

    <td width="21%" valign="bottom" align="left"><input type="button" value="Get All Groups"

    name="BtnGetAllGroups">&nbsp; </td>

    <td width="30%" valign="bottom" align="left"><input type="button"

    value="Get Local Machine" name="BtnGetMachine"></td>

    <td width="24%" valign="bottom" align="left"></td>

  </tr>

  <tr>

    <td width="25%">UserID<br>

    <input type="TEXT" value name="UserID" size="27"></td>

    <td width="21%" valign="bottom" align="left"><input type="button" value="Get User Groups"

    name="BtnGetUserGroups"></td>

    <td width="22%" valign="bottom" align="left"><input type="button" value="Is Member"

    name="BtnIsMember"></td>

  </tr>

  <tr>

    <td width="25%">Group<br>

    <input type="TEXT" value name="Group" size="27"></td>

    <td width="21%" valign="bottom" align="left"><input type="button" value="Get Group Users"

    name="BtnGetGroupUsers"></td>

    <td width="22%" valign="bottom" align="left"><input type="button" value="Add Local Group"

    name="BtnAddGlobalGroup"><input type="button" value="Delete Group" name="BtnDeleteGroup"></td>

    <td width="24%" valign="bottom" align="left"></td>

  </tr>

  <tr>

    <td width="25%">Group Comment<br>

    <input type="TEXT" value name="Comment" size="27"></td>

    <td width="21%" valign="bottom" align="left"><input type="button" value="Add Member"

    name="BtnAddMember"></td>

    <td width="22%" valign="bottom" align="left"><input type="button" value="Remove Member"

    name="BtnRemoveMember"></td>

    <td width="24%" valign="bottom" align="left"></td>

  </tr>

  <tr>

    <td width="25%">Connect UserID<br>

    <input type="TEXT" value name="conUserID" size="27"><br>

    Connect Password<br>

    <input type="password" value name="Password" size="27"></td>

    <td width="21%" valign="bottom" align="left"><input type="button" value="Connect User"

    name="BtnConnectUser"><p><input type="button" value="Disconnect User"

    name="BtnDisconnectUser"></td>

    <td width="22%" valign="bottom" align="left"></td>

    <td width="24%" valign="bottom" align="left"></td>

  </tr>

</table>

</div>

<p align="left"><textarea name="List1" rows="4" cols="60"></textarea></p>

<script language="VBSCRIPT">

Sub Window_OnLoad()

frmMachine.value = DLGroupCtl1.GetMachineName

UserID.value = DLGroupCtl1.GetCurrentUserID

End Sub

Sub BtnGetAllGroups_OnClick()

List1.value = ""

DLGroupCtl1.Machine = frmMachine.value

DLGroupCtl1.SetFirstGroup

While DLGroupCtl1.GroupGetNext <> 0

if List1.value = "" then

List1.value = DLGroupCtl1.Group + Chr(9) + DLGroupCtl1.GroupComment

else

List1.value = List1.value + chr(10) + DLGroupCtl1.Group + Chr(9) + DLGroupCtl1.GroupComment

end if

Wend

End Sub

Sub BtnGetUserGroups_OnClick()

List1.value = ""

DLGroupCtl1.Machine = frmMachine.value

DLGroupCtl1.UserID = UserID.value

DLGroupCtl1.SetFirstUserGroup

While DLGroupCtl1.UserGroupGetNext <> 0

if List1.value = "" then

List1.value = DLGroupCtl1.Group

else

List1.value = List1.value + chr(10) + DLGroupCtl1.Group

end if

Wend

End Sub

Sub BtnIsMember_OnClick()

DLGroupCtl1.Machine = frmMachine.value

DLGroupCtl1.UserID = UserID.value

DLGroupCtl1.Group = Group.value

If DLGroupCtl1.IsMember = -1 Then

    MsgBox "User " + DLGroupCtl1.UserID + " Is Member of group " + Group.value

Else

    MsgBox "User " + DLGroupCtl1.UserID + " Is NOT Member of group " + Group.value

End If

End Sub

Sub BtnGetGroupUsers_OnClick()

List1.value = ""

DLGroupCtl1.Machine = frmMachine.value

DLGroupCtl1.Group = Group.value

DLGroupCtl1.SetFirstUser

While DLGroupCtl1.UserGetNext <> 0

if List1.value = "" then

List1.value = DLGroupCtl1.UserID

else

List1.value = List1.value + chr(10) + DLGroupCtl1.UserID

end if

Wend

End Sub

Sub BtnAddGlobalGroup_OnClick()

DLGroupCtl1.Machine = frmMachine.value

DLGroupCtl1.Group = Group.value

DLGroupCtl1.GroupComment = Comment.value

DLGroupCtl1.GroupAdd

End Sub

Sub BtnDeleteGroup_OnClick()

DLGroupCtl1.Machine = frmMachine.value

DLGroupCtl1.Group = Group.value

DLGroupCtl1.GroupRemove

End Sub

Sub BtnAddMember_OnClick()

DLGroupCtl1.Machine = frmMachine.value

DLGroupCtl1.UserID = UserID.value

DLGroupCtl1.Group = Group.value

DLGroupCtl1.GroupAddMember

End Sub

Sub BtnRemoveMember_OnClick()

DLGroupCtl1.Machine = frmMachine.value

DLGroupCtl1.UserID = UserID.value

DLGroupCtl1.Group = Group.value

DLGroupCtl1.GroupRemoveMember

End Sub

Sub BtnDisconnectUser_OnClick()

End Sub

Sub BtnConnectUser_OnClick()

DLGroupCtl1.Machine = frmMachine.value

DLGroupCtl1.UserID = conUserID.value

DLGroupCtl1.Password = Password.value

DLGroupCtl1.UserConnect

End Sub

Sub BtnDisconnectUser_OnClick()

DLGroupCtl1.Machine = frmMachine.value

DLGroupCtl1.UserDisconnect

End Sub

Sub BtnGetMachine_OnClick()

frmMachine.value = DLGroupCtl1.GetMachineName

End Sub

</script>

</body>

</html>


Displays appropriate Copyright notices
Copyright

Copyright© 1998 DameWare Development

Portions of this product are Copyrighted (c) 1991-1998 by Microsoft Corporation.

All rights are reserved. All  Microsoft Corporation disclaimers apply.

DLGroup is a trademark of DameWare Development.

Microsoft Windows is a registered trademark of Microsoft Corporation.

Microsoft Windows Scripting Host is a registered trademark of Microsoft Corporation.


Displays Properties
Properties

All the properties are listed below. Properties that apply only to

DLGroup, or require special consideration when used with it,

are underlined. They are documented in this help file. See the

Visual Basic Language Reference or online Help for

documentation of the remaining properties.

(About)	(Name)
DragIcon	DragMode
Group	GroupComment
Height	HelpContextID
Index	LastError
Left	Machine
Password	TabIndex
TabStop	Tag
ToolTipText	Top
UserID	Valid
Visible	WhatsThisHelpID
Width


Display the DLGroup About box
(About) Property

Properties	Methods

Description

The (About) property will invoke the DameWare Local Group About box dialog.  This dialog is used to display the control’s registration information.

Syntax

DLGroupCtl1.AboutBox

Notes

The About box dialog will be displayed in the Windows environment until the control is registered with the license file (DLGroup.lic), the Web environment with the license file (DLGroup.lpk) or the Windows Scripting Host environment with the license file (DLGroupR.lic).


Specify the local group.
Group Property

Properties	Methods

Description

Specifies or returns the Windows NT Local group(s).

Syntax

DLGroupCtl1.Group = “Users”

Data Type

String

Example

Private Sub Form_Load()

DLGroupCtl1.Machine = Text1.Text

DLGroupCtl1.UserID = Text2.Text

DLGroupCtl1.Group = Text3.Text

DLGroupCtl1.GroupAddMember

End Sub

See Also

GroupComment


Specify the local group comment.
GroupComment Property

Properties	Methods

Description

Specifies or returns the Windows NT local group comment.

Syntax

DLGroupCtl1.GroupComment = “New local group”

Data Type

String

Example

Private Sub Form_Load()

DLGroupCtl1.Machine = Text1.Text

DLGroupCtl1.Group = Text3.Text

DLGroupCtl1.GroupComment = Text5.Text

DLGroupCtl1.GroupAdd

End Sub

See Also

Group


Returns the last system level error code trapped by DLGroup.
LastError Property

Properties	Methods

Description

Retrieves or returns the last operating system or system level error code trapped by DLGroup.

Syntax

MyLong = DLGroupCtl1.LastError

Data Type

Long

Example

Sub OnErrorHandler()

MsgBox "Last error was " & DLGroupCtl1.LastError

If Err.Number <> 0 Then

    MsgBox Err.Description, vbCritical, "Error"

End If

End Sub


Specify machine name.
Machine Property

Properties	Methods

Description

Specifies or returns the Windows NT Machine Name to use to display the local groups of.

Syntax

DLGroupCtl1.Machine = "\\mymachine"

Data Type

String

Notes

When used to specify a machine name, you must prefix the entry with two backslashes (\\):

\\mymachine	for a machine with a name of ‘mymachine’

\\klingon	for a machine with a name of ‘klingon’

Example

Private Sub Form_Load()

Text1.Text = "\\mymachine"

DLGroupCtl1.Machine = Text1.Text

DLGroupCtl1.UserID = Text6.Text

DLGroupCtl1.Password = Text4.Text

DLGroupCtl1.UserConnect

End Sub

See Also

Password

UserID


Specify the password for a UserID on the machine.
Password Property

Properties	Methods

Description

Specifies the password for an individual UserID account on a Windows NT Machine that will be used to connect to that machine.

Syntax

DLGroupCtl1.Password = “mypassword”

Data Type

String

Example

Private Sub Form_Load()

DLGroupCtl1.Machine = Text1.Text

DLGroupCtl1.UserID = Text6.Text

DLGroupCtl1.Password = Text4.Text

DLGroupCtl1.UserConnect

End Sub

See Also

UserID

Machine


Specify the UserID account to connect with on the machine.
UserID Property

Properties	Methods

Description

Specifies the UserID account for an individual UserID on a Windows NT Machine that will be used to connect to that machine.

Syntax

DLGroupCtl1.UserID = “myuserid”

Data Type

String

Example

Private Sub Form_Load()

DLGroupCtl1.Machine = Text1.Text

DLGroupCtl1.UserID = Text6.Text

DLGroupCtl1.Password = Text4.Text

DLGroupCtl1.UserConnect

End Sub

See Also

Password

Machine


Displays Methods
Methods

All of the methods are listed below. Methods that apply only to

DLGroup, or require special consideration when used

with it, are underlined. They are documented in this help file.

See the Visual Basic Language Reference or online Help for

documentation of the remaining events.

GetCurrentUserID

GetMachineName

GroupAdd

GroupAddMember

GroupGetNext

GroupRemove

GroupRemoveMember

IsMember

SetFirstGroup

SetFirstUser

SetFirstUserGroup

UserConnect

UserDisconnect

UserGetNext

UserGroupGetNext


Retrieve the current user account on the machine.
GetCurrentUserID Method

Properties	Methods

Description

Retrieve the current user account on the machine.

Syntax

Text2.Text = DLGroupCtl1.GetCurrentUserID

Data Type

String

Example

Private Sub Command2_Click()

Text2.Text = DLGroupCtl1.GetCurrentUserID

End Sub

See Also

GetMachineName


Retrieve the local machine name.
GetMachineName Method

Properties	Methods

Description

Retrieve the local machine name.

Syntax

Text1.Text = DLGroupCtl1.GetMachineName

Data Type

String

Example

Private Sub Command1_Click()

Text1.Text = DLGroupCtl1.GetMachineName

End Sub

See Also

GetCurrentUserID


Add a new local group to a machine.
GroupAdd Method

Properties	Methods

Description

Add a new local group to a Windows NT machine.

Syntax

DLGroupCtl1.GroupAdd

Example

Private Sub Command1_Click()

DLGroupCtl1.Machine = Text1.Text

DLGroupCtl1.Group = Text3.Text

DLGroupCtl1.GroupComment = Text5.Text

DLGroupCtl1.GroupAdd

End Sub

See Also

GroupAddMember

GroupRemove

GroupGetNext

GroupRemoveMember

SetFirstUserGroup

UserGroupGetNext


Add a user account to an existing local group on a machine.
GroupAddMember Method

Properties	Methods

Description

Add a specific user account to an existing local group on a Windows NT machine.

Syntax

DLGroupCtl1.GroupAddMember

Example

Private Sub Command1_Click()

DLGroupCtl1.Machine = Text1.Text

DLGroupCtl1.UserID = Text2.Text

DLGroupCtl1.Group = Text3.Text

DLGroupCtl1.GroupAddMember

End Sub

See Also

GroupAdd

GroupRemove

GroupGetNext

GroupRemoveMember

SetFirstUserGroup

UserGroupGetNext


Advance to the next local group from a Windows NT machine..
GroupGetNext Method

Properties	Methods

Description

Advance sequentially to the next local group from a Windows NT machine.  Normally used in a program loop to retrieve a list of all the local groups on a Windows NT machine.

Syntax

While DLGroupCtl1.GroupGetNext <> 0

Data Type

Boolean

Example

Private Sub Command1_Click()

DLGroupCtl1.Machine = Text1.Text

DLGroupCtl1.SetFirstGroup

i = 0

While DLGroupCtl1.GroupGetNext <> 0

    List1.AddItem DLGroupCtl1.Group + Chr(9) + DLGroupCtl1.GroupComment

    i = i + 1

    Label6.Caption = "Count: " + Str(i)

    Label6.Refresh

Wend

End Sub

See Also

GroupAdd

GroupAddMember

GroupRemove

GroupRemoveMember

SetFirstUserGroup

UserGroupGetNext


Delete an existing local group from a machine.
GroupRemove Method

Properties	Methods

Description

Delete an existing local group from a Windows NT machine.

Syntax

DLGroupCtl1.GroupRemove

Example

Private Sub Command1_Click()

DLGroupCtl1.Machine = Text1.Text

DLGroupCtl1.Group = Text3.Text

DLGroupCtl1.GroupRemove

End Sub

See Also

GroupAdd

GroupAddMember

GroupRemoveMember


Remove a user account from an existing local group on a machine.
GroupRemoveMember Method

Properties	Methods

Description

Remove a specific user account from an existing local group on a Windows NT machine.

Syntax

DLGroupCtl1.GroupRemoveMember

Example

Private Sub Command1_Click()

DLGroupCtl1.Machine = Text1.Text

DLGroupCtl1.UserID = Text2.Text

DLGroupCtl1.Group = Text3.Text

DLGroupCtl1.GroupRemoveMember

End Sub

See Also

GroupAdd

GroupAddMember

GroupRemove

GroupGetNext

SetFirstUserGroup

UserGroupGetNext


Determine if a user account is a member of an existing local group on a machine.
IsMember Method

Properties	Methods

Description

Determine if a specific user account is a member of an existing local group on a Windows NT machine.

Syntax

DLGroupCtl1.IsMember

Data Type

Boolean

Notes

IsMember returns “-1” for True.

Example

Private Sub Command1_Click()

DLGroupCtl1.Machine = Text1.Text

DLGroupCtl1.UserID = Text2.Text

DLGroupCtl1.Group = Text3.Text

If DLGroupCtl1.IsMember = True Then

    MsgBox "User " + DLGroupCtl1.UserID + " Is Member of group " + Text3.Text

Else

    MsgBox "User " + DLGroupCtl1.UserID + " Is NOT Member of group " + Text3.Text

End If

End Sub

See Also

GroupAdd

GroupAddMember

GroupRemove

GroupGetNext

SetFirstUserGroup

UserGroupGetNext


Specify to DLGroup to set the first found local group as the default.
SetFirstGroup Method

Properties	Methods

Description

Specify to DLGroup to search for and set the first found local group as the default group to gather group comments and user members for.  This method is typically used in a loop where you would retrieve all of the local groups on a Windows NT machine.

Syntax

DLGroupCtl1.SetFirstGroup

Example

Private Sub Command1_Click()

DLGroupCtl1.Machine = Text1.Text

DLGroupCtl1.SetFirstGroup

i = 0

While DLGroupCtl1.GroupGetNext <> 0

    List1.AddItem DLGroupCtl1.Group + Chr(9) + DLGroupCtl1.GroupComment

    i = i + 1

    Label6.Caption = "Count: " + Str(i)

    Label6.Refresh

Wend

End Sub

See Also

SetFirstUser

SetFirstUserGroup

GroupGetNext


Specify to DLGroup to set the first found user in a specified local group as the default.
SetFirstUser Method

Properties	Methods

Description

Specify to DLGroup to search for and set the first user found within the specified local group as the default user.  This method is typically used in a loop where you would retrieve all of the users contained within the specified local group on a Windows NT machine.

Syntax

DLGroupCtl1.SetFirstUser

Example

Private Sub Command1_Click()

DLGroupCtl1.Machine = Text1.Text

DLGroupCtl1.Group = Text3.Text

DLGroupCtl1.SetFirstUser

i = 0

While DLGroupCtl1.UserGetNext <> 0

    List1.AddItem DLGroupCtl1.UserID

    i = i + 1

    Label6.Caption = "Count: " + Str(i)

    Label6.Refresh

Wend

End Sub

See Also

SetFirstGroup

SetFirstUserGroup

UserGetNext


Specify to DLGroup to set the first found user in a specified user group as the default.
SetFirstUserGroup Method

Properties	Methods

Description

Specify to DLGroup to search for and set the first found user group as the default user group to gather user group comments and user group members for.  This method is typically used in a loop where you would retrieve all of the user groups on a Windows NT machine.

Syntax

DLGroupCtl1.SetFirstUserGroup

Example

Private Sub Command1_Click()

DLGroupCtl1.Machine = Text1.Text

DLGroupCtl1.UserID = Text2.Text

DLGroupCtl1.SetFirstUserGroup

i = 0

While DLGroupCtl1.UserGroupGetNext <> 0

    List1.AddItem DLGroupCtl1.Group

    i = i + 1

    Label6.Caption = "Count: " + Str(i)

    Label6.Refresh

Wend

End Sub

See Also

SetFirstGroup

UserGetNext

UserGroupGetNext


Establish a network connection with a specific user account.
UserConnect Method

Properties	Methods

Description

Establish a network connection with a specific user account to a Windows NT machine.

Syntax

DLGroupCtl1.UserConnect

Notes

This method is useful if authentication to a specific Windows NT machine requires a different user account than the currently connected user.  This way a Help Desk individual could use a special account to perform user/group maintenance.

The currently connected user will remain connected when another user connection (or connections) is established.  Use the UserDisconnect method to disconnect any previously connected users.

Example

Private Sub Command1_Click()

DLGroupCtl1.Machine = Text1.Text

DLGroupCtl1.UserID = Text6.Text

DLGroupCtl1.Password = Text4.Text

DLGroupCtl1.UserConnect

End Sub

See Also

UserDisconnect


Disconnect a network connection with a specific user account.
UserDisconnect Method

Properties	Methods

Description

Disconnect a network connection with a specific user account to a Windows NT machine.

Syntax

DLGroupCtl1.UserDisconnect

Example

Private Sub Command1_Click()

DLGroupCtl1.Machine = Text1.Text

DLGroupCtl1.UserDisconnect

End Sub

See Also

UserConnect


Retrieve the next user in a specified local group.
UserGetNext Method

Properties	Methods

Description

Retrieve the next user account in a specified Windows NT machine, within a specified local group.  This method is typically used in a loop where you would retrieve all of the users contained within the specified local group on a Windows NT machine.

Syntax

While DLGroupCtl1.UserGetNext <> 0

Data Type

Boolean

Example

Private Sub Command1_Click()

DLGroupCtl1.Machine = Text1.Text

DLGroupCtl1.Group = Text3.Text

DLGroupCtl1.SetFirstUser

i = 0

While DLGroupCtl1.UserGetNext <> 0

    List1.AddItem DLGroupCtl1.UserID

    i = i + 1

    Label6.Caption = "Count: " + Str(i)

    Label6.Refresh

Wend

End Sub

See Also

SetFirstGroup

SetFirstUser

UserGetNext


Retrieve the next user in a specified user group.
UserGroupGetNext Method

Properties	Methods

Description

Retrieve the next user account in a specified Windows NT machine, within a specified user group.  This method is typically used in a loop where you would retrieve all of the users contained within the specified user group on a Windows NT machine.

Syntax

While DLGroupCtl1.UserGroupGetNext <> 0

Data Type

Boolean

Example

Private Sub Command1_Click()

DLGroupCtl1.Machine = Text1.Text

DLGroupCtl1.UserID = Text2.Text

DLGroupCtl1.SetFirstUserGroup

i = 0

While DLGroupCtl1.UserGroupGetNext <> 0

    List1.AddItem DLGroupCtl1.Group

    i = i + 1

    Label6.Caption = "Count: " + Str(i)

    Label6.Refresh

Wend

End Sub

See Also

SetFirstGroup

SetFirstUser

SetFirstUserGroup

UserGetNext

UserGroupGetNext